package com.jackstraw.jack_base.datasource.database.redis.service.impl;

import com.jackstraw.jack_base.datasource.common.aspect.annotation.DataSourceNameCut;
import com.jackstraw.jack_base.datasource.common.entity.enums.DataSourceTypeEnum;
import com.jackstraw.jack_base.datasource.database.redis.service.DemoRedisService;
import com.jackstraw.jack_base.datasource.redis.bean.RedisRouting;
import com.jackstraw.jack_base.datasource.redis.service.impl.RedisServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.redisson.api.RLock;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.connection.DataType;
import org.springframework.data.redis.core.Cursor;
import org.springframework.data.redis.core.ScanOptions;
import org.springframework.data.redis.core.ZSetOperations;

import java.time.Instant;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;

@Slf4j
@DataSourceNameCut(dataSourceName = "redisSourceName2", dataSourceTypeEnum = DataSourceTypeEnum.redis)
public class DemoRedisServiceImpl extends RedisServiceImpl implements DemoRedisService {

    public DemoRedisServiceImpl(RedisRouting redisRouting) {
        super(redisRouting);
    }


    @Override
    @Cacheable(value = "otherBBB", key = "")
    public String bbb() {
        return "otherBBB";
    }

    @Override
    public RLock lock(String lockKey) {
        return super.lock(lockKey);
    }

    @Override
    public RLock lock(String lockKey, long leaseTime) {
        return super.lock(lockKey, leaseTime);
    }

    @Override
    public RLock lock(String lockKey, TimeUnit unit, long timeout) {
        return super.lock(lockKey, unit, timeout);
    }

    @Override
    public boolean tryLock(String lockKey, TimeUnit unit, long waitTime, long leaseTime) {
        return super.tryLock(lockKey, unit, waitTime, leaseTime);
    }

    @Override
    public void unlock(String lockKey) {
        super.unlock(lockKey);
    }

    @Override
    public void unlock(RLock lock) {
        super.unlock(lock);
    }

    @Override
    public void delete(String key) {
        super.delete(key);
    }

    @Override
    public void delete(Collection<String> keys) {
        super.delete(keys);
    }

    @Override
    public byte[] dump(String key) {
        return super.dump(key);
    }

    @Override
    public Boolean hasKey(String key) {
        return super.hasKey(key);
    }

    @Override
    public Boolean expire(String key, long timeout, TimeUnit unit) {
        return super.expire(key, timeout, unit);
    }

    @Override
    public Boolean expireAt(String key, Date date) {
        return super.expireAt(key, date);
    }

    @Override
    public Boolean expireAt(String key, Instant instant) {
        return super.expireAt(key, instant);
    }

    @Override
    public Set<String> keys(String pattern) {
        return super.keys(pattern);
    }

    @Override
    public Boolean move(String key, int dbIndex) {
        return super.move(key, dbIndex);
    }

    @Override
    public Boolean persist(String key) {
        return super.persist(key);
    }

    @Override
    public Long getExpire(String key, TimeUnit unit) {
        return super.getExpire(key, unit);
    }

    @Override
    public Long getExpire(String key) {
        return super.getExpire(key);
    }

    @Override
    public Object randomKey() {
        return super.randomKey();
    }

    @Override
    public void rename(String oldKey, String newKey) {
        super.rename(oldKey, newKey);
    }

    @Override
    public Boolean renameIfAbsent(String oldKey, String newKey) {
        return super.renameIfAbsent(oldKey, newKey);
    }

    @Override
    public DataType type(String key) {
        return super.type(key);
    }

    @Override
    public void set(String key, Object value) {
        super.set(key, value);
    }

    @Override
    public Object get(String key) {
        return super.get(key);
    }

    @Override
    public String getRange(String key, long start, long end) {
        return super.getRange(key, start, end);
    }

    @Override
    public Object getAndSet(String key, String value) {
        return super.getAndSet(key, value);
    }

    @Override
    public Boolean getBit(String key, long offset) {
        return super.getBit(key, offset);
    }

    @Override
    public List<Object> multiGet(Collection<String> keys) {
        return super.multiGet(keys);
    }

    @Override
    public boolean setBit(String key, long offset, boolean value) {
        return super.setBit(key, offset, value);
    }

    @Override
    public void setEx(String key, Object value, long timeout, TimeUnit unit) {
        super.setEx(key, value, timeout, unit);
    }

    @Override
    public boolean setIfAbsent(String key, Object value) {
        return super.setIfAbsent(key, value);
    }

    @Override
    public void setRange(String key, Object value, long offset) {
        super.setRange(key, value, offset);
    }

    @Override
    public Long size(String key) {
        return super.size(key);
    }

    @Override
    public void multiSet(Map<String, Object> maps) {
        super.multiSet(maps);
    }

    @Override
    public boolean multiSetIfAbsent(Map<String, Object> maps) {
        return super.multiSetIfAbsent(maps);
    }

    @Override
    public Long incrBy(String key, long increment) {
        return super.incrBy(key, increment);
    }

    @Override
    public Long incrBy(String key) {
        return super.incrBy(key);
    }

    @Override
    public Long decrByFloat(String key) {
        return super.decrByFloat(key);
    }

    @Override
    public Long decrBy(String key, long increment) {
        return super.decrBy(key, increment);
    }

    @Override
    public Double incrByFloat(String key, double increment) {
        return super.incrByFloat(key, increment);
    }

    @Override
    public Integer append(String key, String value) {
        return super.append(key, value);
    }

    @Override
    public Object hGet(String key, String field) {
        return super.hGet(key, field);
    }

    @Override
    public Map<Object, Object> hGetAll(String key) {
        return super.hGetAll(key);
    }

    @Override
    public List<Object> hMultiGet(String key, Collection<Object> fields) {
        return super.hMultiGet(key, fields);
    }

    @Override
    public void hPut(String key, String hashKey, String value) {
        super.hPut(key, hashKey, value);
    }

    @Override
    public void hPutAll(String key, Map<String, String> maps) {
        super.hPutAll(key, maps);
    }

    @Override
    public Boolean hPutIfAbsent(String key, String hashKey, String value) {
        return super.hPutIfAbsent(key, hashKey, value);
    }

    @Override
    public Long hDelete(String key, Object... fields) {
        return super.hDelete(key, fields);
    }

    @Override
    public boolean hExists(String key, String field) {
        return super.hExists(key, field);
    }

    @Override
    public Long hIncrBy(String key, Object field, long increment) {
        return super.hIncrBy(key, field, increment);
    }

    @Override
    public Double hIncrByFloat(String key, Object field, double delta) {
        return super.hIncrByFloat(key, field, delta);
    }

    @Override
    public Set<Object> hKeys(String key) {
        return super.hKeys(key);
    }

    @Override
    public Long hSize(String key) {
        return super.hSize(key);
    }

    @Override
    public List<Object> hValues(String key) {
        return super.hValues(key);
    }

    @Override
    public Cursor<Map.Entry<Object, Object>> hScan(String key, ScanOptions options) {
        return super.hScan(key, options);
    }

    @Override
    public Object lIndex(String key, long index) {
        return super.lIndex(key, index);
    }

    @Override
    public List<Object> lRange(String key, long start, long end) {
        return super.lRange(key, start, end);
    }

    @Override
    public Long lLeftPush(String key, String value) {
        return super.lLeftPush(key, value);
    }

    @Override
    public Long lLeftPushAll(String key, String... value) {
        return super.lLeftPushAll(key, value);
    }

    @Override
    public Long lLeftPushAll(String key, Collection<String> value) {
        return super.lLeftPushAll(key, value);
    }

    @Override
    public Long lLeftPushIfPresent(String key, String value) {
        return super.lLeftPushIfPresent(key, value);
    }

    @Override
    public Long lLeftPush(String key, String pivot, String value) {
        return super.lLeftPush(key, pivot, value);
    }

    @Override
    public Long lRightPush(String key, String value) {
        return super.lRightPush(key, value);
    }

    @Override
    public Long lRightPushAll(String key, String... value) {
        return super.lRightPushAll(key, value);
    }

    @Override
    public Long lRightPushAll(String key, Collection<String> value) {
        return super.lRightPushAll(key, value);
    }

    @Override
    public Long lRightPushIfPresent(String key, String value) {
        return super.lRightPushIfPresent(key, value);
    }

    @Override
    public Long lRightPush(String key, String pivot, String value) {
        return super.lRightPush(key, pivot, value);
    }

    @Override
    public void lSet(String key, long index, String value) {
        super.lSet(key, index, value);
    }

    @Override
    public Object lLeftPop(String key) {
        return super.lLeftPop(key);
    }

    @Override
    public Object lBLeftPop(String key, long timeout, TimeUnit unit) {
        return super.lBLeftPop(key, timeout, unit);
    }

    @Override
    public Object lRightPop(String key) {
        return super.lRightPop(key);
    }

    @Override
    public Object lBRightPop(String key, long timeout, TimeUnit unit) {
        return super.lBRightPop(key, timeout, unit);
    }

    @Override
    public Object lRightPopAndLeftPush(String sourceKey, String destinationKey) {
        return super.lRightPopAndLeftPush(sourceKey, destinationKey);
    }

    @Override
    public Object lBRightPopAndLeftPush(String sourceKey, String destinationKey, long timeout, TimeUnit unit) {
        return super.lBRightPopAndLeftPush(sourceKey, destinationKey, timeout, unit);
    }

    @Override
    public Long lRemove(String key, long index, String value) {
        return super.lRemove(key, index, value);
    }

    @Override
    public void lTrim(String key, long start, long end) {
        super.lTrim(key, start, end);
    }

    @Override
    public Long lLen(String key) {
        return super.lLen(key);
    }

    @Override
    public Long sAdd(String key, String... values) {
        return super.sAdd(key, values);
    }

    @Override
    public Long sRemove(String key, Object... values) {
        return super.sRemove(key, values);
    }

    @Override
    public Object sPop(String key) {
        return super.sPop(key);
    }

    @Override
    public Boolean sMove(String key, String value, String destKey) {
        return super.sMove(key, value, destKey);
    }

    @Override
    public Long sSize(String key) {
        return super.sSize(key);
    }

    @Override
    public Boolean sIsMember(String key, Object value) {
        return super.sIsMember(key, value);
    }

    @Override
    public Set<Object> sIntersect(String key, String otherKey) {
        return super.sIntersect(key, otherKey);
    }

    @Override
    public Set<Object> sIntersect(String key, Collection<String> otherKeys) {
        return super.sIntersect(key, otherKeys);
    }

    @Override
    public Long sIntersectAndStore(String key, String otherKey, String destKey) {
        return super.sIntersectAndStore(key, otherKey, destKey);
    }

    @Override
    public Long sIntersectAndStore(String key, Collection<String> otherKeys, String destKey) {
        return super.sIntersectAndStore(key, otherKeys, destKey);
    }

    @Override
    public Set<Object> sUnion(String key, String otherKeys) {
        return super.sUnion(key, otherKeys);
    }

    @Override
    public Set<Object> sUnion(String key, Collection<String> otherKeys) {
        return super.sUnion(key, otherKeys);
    }

    @Override
    public Long sUnionAndStore(String key, String otherKey, String destKey) {
        return super.sUnionAndStore(key, otherKey, destKey);
    }

    @Override
    public Long sUnionAndStore(String key, Collection<String> otherKeys, String destKey) {
        return super.sUnionAndStore(key, otherKeys, destKey);
    }

    @Override
    public Set<Object> sDifference(String key, String otherKey) {
        return super.sDifference(key, otherKey);
    }

    @Override
    public Set<Object> sDifference(String key, Collection<String> otherKeys) {
        return super.sDifference(key, otherKeys);
    }

    @Override
    public Long sDifference(String key, String otherKey, String destKey) {
        return super.sDifference(key, otherKey, destKey);
    }

    @Override
    public Long sDifference(String key, Collection<String> otherKeys, String destKey) {
        return super.sDifference(key, otherKeys, destKey);
    }

    @Override
    public Set<Object> setMembers(String key) {
        return super.setMembers(key);
    }

    @Override
    public Object sRandomMember(String key) {
        return super.sRandomMember(key);
    }

    @Override
    public List<Object> sRandomMembers(String key, long count) {
        return super.sRandomMembers(key, count);
    }

    @Override
    public Set<Object> sDistinctRandomMembers(String key, long count) {
        return super.sDistinctRandomMembers(key, count);
    }

    @Override
    public Cursor<Object> sScan(String key, ScanOptions options) {
        return super.sScan(key, options);
    }

    @Override
    public Boolean zAdd(String key, String value, double score) {
        return super.zAdd(key, value, score);
    }

    @Override
    public Long zAdd(String key, Set<ZSetOperations.TypedTuple<Object>> values) {
        return super.zAdd(key, values);
    }

    @Override
    public Long zRemove(String key, Object... values) {
        return super.zRemove(key, values);
    }

    @Override
    public Double zIncrementScore(String key, String value, double delta) {
        return super.zIncrementScore(key, value, delta);
    }

    @Override
    public Long zRank(String key, Object value) {
        return super.zRank(key, value);
    }

    @Override
    public Long zReverseRank(String key, Object value) {
        return super.zReverseRank(key, value);
    }

    @Override
    public Set<Object> zRange(String key, long start, long end) {
        return super.zRange(key, start, end);
    }

    @Override
    public Set<ZSetOperations.TypedTuple<Object>> zRangeWithScores(String key, long start, long end) {
        return super.zRangeWithScores(key, start, end);
    }

    @Override
    public Set<Object> zRangeByScore(String key, double min, double max) {
        return super.zRangeByScore(key, min, max);
    }

    @Override
    public Set<ZSetOperations.TypedTuple<Object>> zRangeByScoreWithScores(String key, double min, double max) {
        return super.zRangeByScoreWithScores(key, min, max);
    }

    @Override
    public Set<ZSetOperations.TypedTuple<Object>> zRangeByScoreWithScores(String key, double min, double max, long start, long end) {
        return super.zRangeByScoreWithScores(key, min, max, start, end);
    }

    @Override
    public Set<Object> zReverseRange(String key, long start, long end) {
        return super.zReverseRange(key, start, end);
    }

    @Override
    public Set<ZSetOperations.TypedTuple<Object>> zReverseRangeWithScores(String key, long start, long end) {
        return super.zReverseRangeWithScores(key, start, end);
    }

    @Override
    public Set<Object> zReverseRangeByScore(String key, double min, double max) {
        return super.zReverseRangeByScore(key, min, max);
    }

    @Override
    public Set<ZSetOperations.TypedTuple<Object>> zReverseRangeByScoreWithScores(String key, double min, double max) {
        return super.zReverseRangeByScoreWithScores(key, min, max);
    }

    @Override
    public Set<Object> zReverseRangeByScore(String key, double min, double max, long start, long end) {
        return super.zReverseRangeByScore(key, min, max, start, end);
    }

    @Override
    public Long zCount(String key, double min, double max) {
        return super.zCount(key, min, max);
    }

    @Override
    public Long zSize(String key) {
        return super.zSize(key);
    }

    @Override
    public Long zZCard(String key) {
        return super.zZCard(key);
    }

    @Override
    public Double zScore(String key, Object value) {
        return super.zScore(key, value);
    }

    @Override
    public Long zRemoveRange(String key, long start, long end) {
        return super.zRemoveRange(key, start, end);
    }

    @Override
    public Long zRemoveRangeByScore(String key, double min, double max) {
        return super.zRemoveRangeByScore(key, min, max);
    }

    @Override
    public Long zUnionAndStore(String key, String otherKey, String destKey) {
        return super.zUnionAndStore(key, otherKey, destKey);
    }

    @Override
    public Long zUnionAndStore(String key, Collection<String> otherKeys, String destKey) {
        return super.zUnionAndStore(key, otherKeys, destKey);
    }

    @Override
    public Long zIntersectAndStore(String key, String otherKey, String destKey) {
        return super.zIntersectAndStore(key, otherKey, destKey);
    }

    @Override
    public Long zIntersectAndStore(String key, Collection<String> otherKeys, String destKey) {
        return super.zIntersectAndStore(key, otherKeys, destKey);
    }

    @Override
    public Cursor<ZSetOperations.TypedTuple<Object>> zScan(String key, ScanOptions options) {
        return super.zScan(key, options);
    }
}
